<template>
  <div class="body">
    {{ msg }}
    <input type="text" v-model="msg2" @input="sonchange()">
    <button class="v" @click="sonchange">1111</button>
    <sonsson :msg="msg2"/>
  </div>
</template>

<script lang='ts' setup>
import { ref,watch,reactive,defineProps } from "vue"
import  sonsson from './sonsson.vue'
defineProps({
  msg:String
})

let msg2=ref("")
const emit = defineEmits(['son'])
const sonchange=()=>{
    emit("son",msg2.value)
}
</script>

<style lang="less"  scoped>
.body{
    background-color: aqua;
    .v{
        height: 100px;
    }
}
</style>
